--[[/**
-- * 
 * 血量增加后触发
-- *
-- */]]

---@class BuffEffect607100 : BaseBuffEffect
BuffEffect607100 = ClientFight.CreateClass("BuffEffect607100", ClientFight.BaseBuffEffect)
local t = BuffEffect607100
t.BuffEffect607100_ADD_HP = "BuffEffect607100_ADD_HP";
---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local parameters = {...};
    if (FightEventEnum.HP_CHANGE_ADD ~= buff.buffBean.f_BuffActionTrigger) then
        return IBuffEffect.FAIL;
    end
    local addHp = parameters[1];
    local old = buff.target.parametersByObject[t.BuffEffect607100_ADD_HP] or 0;
    buff.target.parametersByObject[t.BuffEffect607100_ADD_HP] = old + addHp;

    SkillRoleMgr.savePathFile("[" .. fight.frame .. "][EFFECT]Fighter " .. buff.target.fighterId .. " Buff:"
            .. buff.modelId .. " 累积恢复生命：" .. (old + addHp) .. " 本次恢复生命: " .. addHp);

    return ClientFight.BaseBuffEffect.action(self, fight, buff, ...);
end

t.New()